const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,

  // 让组件的name属性不用按照一定的格式去写, 关闭eslint警告
  lintOnSave: false,

  // webpack-dev-server 相关配置
  devServer: {
    proxy: {
      '/api': {
        target: "http://localhost:4000",
        // 支持跨域
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
})
